package com.leaf.spring.y201906.day21.yml;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.leaf.spring.y201906.day21.AppConfig;

/**
 * 1. pom 依赖需要加入 spring-boot-configuration-processor <br/>
 * 2. @ConfigurationProperties bean上加入
 * 3. @EnableConfigurationProperties 开启
 * 
 * @Title:
 * @Description:
 * @Author: leaf
 * @Since:2019年6月21日
 * @Version:1.1.0
 */
public class YmlTest {

	public static void main(String[] args) {

		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

		LeafProperties bean = context.getBean("leafProperties", LeafProperties.class);

		System.out.println(bean);
		
		context.close();

	}

}
